//package com.zmn.plat.dubbo.controller;
//
//import com.zmn.common.dto2.ResponseDTO;
//import com.zmn.plat.business.interfaces.price.AdvanceFlowBService;
//import com.zmn.plat.business.interfaces.price.MeterFlowBService;
//import com.zmn.plat.business.interfaces.price.meter3.Meter3ProductPriceBService;
//import com.zmn.plat.business.interfaces.price.meter3.MeterFlow3BService;
//import com.zmn.plat.business.interfaces.price.meter3.MeterFlow3CommonBService;
//import com.zmn.plat.common.dto.base.AcceptProjectDRO;
//import com.zmn.plat.common.dto.base.FaultDRO;
//import com.zmn.plat.common.dto.base.PhenomenonDRO;
//import com.zmn.plat.common.dto.base.ServiceContentDRO;
//import com.zmn.plat.common.dto.brand.BaseBrandDRO;
//import com.zmn.plat.common.dto.price.ItemTo;
//import com.zmn.plat.common.dto.price.ProductPriceQuery;
//import com.zmn.plat.common.dto.price.meter.*;
//import com.zmn.plat.common.dto.price.meter3.*;
//import com.zmn.plat.common.dto.product.tariff.TariffBackProductDRO;
//import com.zmn.plat.common.dto.product.tariff.TariffProductDRO;
//import com.zmn.plat.common.dto.product.tariff.category.TariffCategoryDRO;
//import com.zmn.plat.common.dto.product.tariff.category.TariffCategoryPageDRO;
//import com.zmn.plat.common.dto.product.tariff.servcategory.TariffServCategoryDRO;
//import com.zmn.plat.common.dto.servcategory.ServCategoryChildrenDRO;
//import com.zmn.plat.dubbo.interfaces.price.MeterFlowRemoteService;
//import com.zmn.plat.dubbo.utils.DubboConsts;
//import com.zmn.plat.model.entity.product.ServProductQuery;
//import com.zmn.plat.services.interfaces.product.ServProductService;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.dubbo.config.annotation.Reference;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//import java.util.List;
//import java.util.stream.Collectors;
//
//@Slf4j
//@RestController
//@RequestMapping("/test/MeterFlow3/")
//public class MeterFlow3Controller {
//
//    @Resource
//    private ServProductService servProductService;
//    @Resource
//    private MeterFlow3CommonBService meterFlow3CommonBService;
//    @Resource
//    private Meter3ProductPriceBService meter3ProductPriceBService;
//    @Resource
//    private MeterFlow3BService meterFlow3BService;
//
//    // 查询产品优先支持的价格表
//    @RequestMapping(value = "test1", method = RequestMethod.POST)
//    public ResponseDTO test1(@RequestBody ProductTariffTypeQuery query) {
//        long start = System.currentTimeMillis();
//        List<ProductTariffTypeDRO> dro = meterFlow3CommonBService.listProductTariffTypeByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//    // 查询产品默认价格信息
//    @RequestMapping(value = "test2", method = RequestMethod.POST)
//    public ResponseDTO test2(@RequestBody ProductPriceQuery query) {
////        ServProductQuery query1 = new ServProductQuery();
////        query1.setShowType(query.getShowType());
////        List<Integer> idList = servProductService.listByQuery(query1).stream().map(e -> e.getProductId()).collect(Collectors.toList());
////        query.setProductIdList(idList);
//
//        long start = System.currentTimeMillis();
//        List<ProductPriceDRO3> dro = meter3ProductPriceBService.listProductPriceByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//    // 根据前台产品查询后台产品列表
//    @RequestMapping(value = "test3", method = RequestMethod.POST)
//    public ResponseDTO test3(@RequestBody MeterErpProductQuery3 query) {
//        long start = System.currentTimeMillis();
//        List<TariffBackProductDRO> dro = meterFlow3BService.listErpProductByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//    // 根据后台产品查询品牌列表
//    @RequestMapping(value = "test4", method = RequestMethod.POST)
//    public ResponseDTO test4(@RequestBody MeterBaseQuery3 query) {
//        long start = System.currentTimeMillis();
//        List<BaseBrandDRO> dro = meterFlow3BService.listBrandByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//    // 根据后台产品查询故障现象
//    @RequestMapping(value = "test5", method = RequestMethod.POST)
//    public ResponseDTO test5(@RequestBody MeterBaseQuery3 query) {
//        long start = System.currentTimeMillis();
//        List<PhenomenonDRO> dro = meterFlow3BService.listPhenoByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//    // 根据后台产品、故障现象查询故障
//    @RequestMapping(value = "test6", method = RequestMethod.POST)
//    public ResponseDTO test6(@RequestBody MeterFaultQuery3 query) {
//        long start = System.currentTimeMillis();
//        List<FaultDRO> dro = meterFlow3BService.listFaultByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//    // 根据后台产品查询服务内容
//    @RequestMapping(value = "test7", method = RequestMethod.POST)
//    public ResponseDTO test7(@RequestBody MeterContentQuery3 query) {
//        long start = System.currentTimeMillis();
//        List<ServiceContentDRO> dro = meterFlow3BService.listServiceContentByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//    // 根据后台产品查询验收项目
//    @RequestMapping(value = "test8", method = RequestMethod.POST)
//    public ResponseDTO test8(@RequestBody MeterAcceptQuery3 query) {
//        long start = System.currentTimeMillis();
//        List<AcceptProjectDRO> dro = meterFlow3BService.listAcceptItemByQuery(query);
//        long end = System.currentTimeMillis();
//        return ResponseDTO.success(dro, "耗时：" + (end - start));
//    }
//
//}
